All Questions
Tagged with mysqldesign-patterns
16 questions
1vote
0answers
484views
Design MySQL database to store user workout data for Workout App
I am building a fitness app and I'm trying to figure out the optimal way to store the data is a MySQL database. I would like to have specific programs (for example, 'get jacked'), I would like a users ...
-4votes
1answer
366views
Design a login system
I have a task of designing login system with the requirement below: If the user login over three times, lock account for the first 5 minutes. The next failed 3 times login-in will lock the user ...
0votes
0answers
69views
What is best approach to designing a local-to-cloud cloud-to-local Infrastructure?
I plan to have a cloud web application(CWA) and several local web application(LWA), let's assume 3 LWAs and 1 CWA. CWA === LWA. This web application would consist of a database server, file storage ...
2votes
2answers
2kviews
Chat part of application - using UDP or TCP?
I'm trying to build a section of my app where two users can message each other. I've read about TCP and UDP and it seems like TCP is more suited due to ordered packet delivery. However, TCP requires a ...
2votes
2answers
229views
How to implement change log of a ticket in complaint management system [closed]
One of the requirement, in the complaint management system were are designing, is to implement complete history of the ticket. For example Status was changed (new to pending to work in progres to done)...
2votes
2answers
86views
Sql: Pre inserting relational entities vs the "lazy creation" of the entities
I have the following entities in my database (it's simplified): Student (id) StudentCourse (id, student_id, course_id) Course (id) Lesson (id) LessonCourse (id, lesson_id, course_id) ...
3votes
1answer
129views
Getting posts from users that are being followed: two different implementations
I have two different implementations for retrieving posts from the users someone is following and I want to know which one you would recommend using. First I'l show you the tables, and then the two ...
1vote
1answer
965views
mySQL / PHP design pattern - one function multiple queries
So here's the gist of it. I'm looking for a design pattern where I can have one function, say queryHandler that gets the query and the parameters from a number of different functions and returns the ...
5votes
3answers
6kviews
Should I use foreign keys in my database if I use laravel?
I'm creating a website with Laravel for the first time. I checked relationships documentation today and it seems that Laravel just uses simple SQL queries. class User extends Eloquent { public ...
1vote
3answers
393views
Passing data between hundreds of objects in java [closed]
Currently, I'm working with a group on building a model. This model simulates interactions between many "agents" in a region. Agents can be any entity such as a city, a farmer, a business etc. Each ...
1vote
1answer
489views
Store Arbitrary values related to mysql record
I have created an app that manages a Data cleansing workflow. Each row imported needs to store an arbitrary number of key value pairs in addition to our standard mysql schema. The key values need to ...
5votes
2answers
3kviews
Design pattern to handle queries using multiple models
I am presented with a dilemma while trying to re-designing the class structure for my PHP/MySQL application to make it more elegant and conform it to the SOLID principle. The problem goes like this: ...
18votes
3answers
7kviews
How to design website workflow?
I have been thinking about this for really long time without reaching an optimum answer. First of all, I'm a medical doctor who loves programming but never really studied it, except for home learning ...
4votes
4answers
2kviews
Entity and pattern validation vs DB constraint
When it comes to performance: What is the better way to validate the user input? If you think about a phone number and you only want numbers in the database, but it could begin with a 0, so you will ...
1vote
3answers
2kviews
Pattern for Accessing MySQL connection
We have an application which is C++ trying to access MySQL database. There are several (about 5 or so) threads in the application (with Boost library for threading) and in each thread has a few ...